//
//  CSViewController.m
//  CSUIKit
//
//  Created by SoulFireWang on 03/01/2017.
//  Copyright (c) 2017 SoulFireWang. All rights reserved.
//

#import "CSViewController.h"
#import <CSUIKit/CSUIKit.h>
#import "HttpHelper.h"
#import "EncryptBase64.h"
#import "BaseNetManager.h"
#import "CSToolBox.h"
#import "CSAddButton.h"
#import <objc/runtime.h>
#import "AFNetworking.h"
#import "CS_Page_TabbarContainerView.h"
#import "CS_Page_CellButton.h"
#import "MJExtension.h"
#import "CSPlaceModel.h"

//定位
#import <CoreLocation/CoreLocation.h>

@interface CSViewController ()<CLLocationManagerDelegate>

@property (nonatomic, strong) CS_Page_TextFieldView *id_CS_Page_TextFieldView;
@property (nonatomic, strong) CS_Page_Button *login_CS_Page_Button;

@property (nonatomic, strong) CSPageEngine *pageEngine;
@property (nonatomic, assign) NSInteger a;
@property (nonatomic, assign) NSInteger b;

@property (nonatomic, strong) UIButton *testButton;

@property (nonatomic, strong) CS_Page_QueryPanelView *queryPanelView;

@property (nonatomic, strong) NSMutableArray *displayItemsGlobal;

@property (nonatomic, assign) BOOL isDemostrating;

@property (nonatomic,strong) CS_Page_SectionTitleView *btCS_Page_SectionTitleView;
@property (nonatomic, strong) CS_Page_TextFieldView *mcCS_Page_TextFieldView;
@property (nonatomic, strong) CS_Page_TextFieldView *czCS_Page_TextFieldView;
@property (nonatomic, strong) CS_Page_TextFieldView *dhCS_Page_TextFieldView;
@property (nonatomic, strong) CS_Page_TextFieldView *dzCS_Page_TextFieldView;
@property (nonatomic, strong) CS_Page_TextFieldView *mzCS_Page_TextFieldView;
@property (nonatomic, strong) CS_Page_TextFieldView *zwCS_Page_TextFieldView;
@property (nonatomic, strong) CS_Page_TextFieldView *sjCS_Page_TextFieldView;
@property (nonatomic, strong) CS_Page_TextFieldView *yxCS_Page_TextFieldView;
@property (nonatomic, strong) CS_Page_TextFieldView *ybCS_Page_TextFieldView;

@property (nonatomic, strong) CS_Page_BulePintDeviceView *bluePrintDeviceView;

@property (nonatomic, strong) UIScrollView *scrollView;
@property (nonatomic, strong) NSString *content;

@property (nonatomic, strong) CS_Page_TabbarContainerView *page_TabbarContainerView;

@property (nonatomic, strong) CS_Page_Button *page_Button1;

@property (nonatomic, strong) CS_Page_CheckBox *checkBox;



/**
 * 是否允许位置更新
 */
@property (nonatomic, assign) BOOL isLocationUpdateEnable;
@property (nonatomic, strong) CLLocationManager *locationManager;
@property (nonatomic, strong) CLGeocoder *geocoder;

@property (nonatomic, strong) CS_Page_TextFieldView *test_CS_Page_TextFieldView;

@end

@implementation CSViewController

#pragma mark - kvo test

#define KVO_CLASS_PREFIX @"CSKVO"

-(UIScrollView *)scrollView{
    if (_scrollView == nil) {
        _scrollView = [UIScrollView new];
        _scrollView.showsVerticalScrollIndicator = NO;
        _scrollView.backgroundColor = COLOR_PAGE_BACKGROUND;
        _scrollView.frame = CGRectMake(0, 0, kWindowW, kWindowH);
        _scrollView.bounces = YES;
        
        [self.view addSubview:self.scrollView];
    }
    return _scrollView;
}

#define IMAGE_WIDTH 120
#define IMAGE_HEIGHT (IMAGE_WIDTH / 312.0 * 340.0)


/**
 *  base64加密处理
 *
 *  @param text 明文
 *
 *  @return 密文
 */
-(NSString *)base64Encrypt:(NSString *)text{
    NSString *resultString = [EncryptBase64 base64StringFromText:text];
    return [EncryptBase64 base64StringFromText:resultString];
}

-(void)viewWillAppear:(BOOL)animated{

}

/**
 * 布局企业信息
 */
-(void)layoutRcjc_QyxxView:(id)responseObj{
    
    [CS_Page_TextView setApplicationColoredString:@"ifi" color:[UIColor colorFromHexCode:@"ffa007"]];
    [CS_Page_TextView setApplicationColoredString:@"uvbefbv" color:[UIColor colorFromHexCode:@"ffa007"]];
    
    [CSBaseView setApplicationColoredString:@"都是地方" color:COLOR_THEME];
    [CSBaseView setApplicationColoredString:@"舟山市" color:[UIColor redColor]];
    [CSBaseView setApplicationColoredString:@"小吃店" color:[UIColor redColor]];
    
    CGFloat primaryY = HEIGHT_NAVIGATIONBAR;
    
    CS_Page_TextView *editView = [CS_Page_TextView page_textViewForEdit:[UIFont systemFontOfSize:FONT_SIZE_1] textColor:COLOR_TEXT_2 content:@"sdfkhrghkdhkgj2i3iuheifhieriuvbefbvkvkbvkdbsj" textAlignment:NSTextAlignmentLeft textChangedHandler:^(UITextView *textvIEW) {
        
    }];
    primaryY = [editView layoutView:self.scrollView primaryY:primaryY];
    
    WS(weakSelf);
    __weak CS_Page_TextView *weakEidtView = editView;
    CS_Page_CellButton *page_cellButton = [CS_Page_CellButton page_CellButtonWithCellTag:nil layoutSubViewHandler:^CGFloat(UIView *superView, CGFloat rightMargin) {
        
        CGFloat localPrimaryY = 0.0;
        
        CS_Page_SectionTitleView *seperatorView = [CS_Page_SectionTitleView new];
        localPrimaryY = [seperatorView layoutView:superView primaryY:localPrimaryY];
        CS_Page_TextView *page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_1] textColor:COLOR_TEXT_1 content:@"胜多负少的范德萨范德萨国际控股航空发动机化工科技的复核结果合法的机构和反对韩国护肤的价格代付款国际饭店换个卡就，实际放款速度讽德诵功货到付款规范化。是的京东if地回复" textAlignment:NSTextAlignmentLeft];
        page_TextView.rightMargin = rightMargin;
        localPrimaryY = [[CS_Page_SpaceView new] layoutView:superView primaryY:localPrimaryY];
        localPrimaryY = [page_TextView layoutView:superView primaryY:localPrimaryY];
        
        return localPrimaryY;
    } clickHander:^(id cellTag) {
    
        weakEidtView.value = @"ehfuifihreuhhrug";
        
    }];
    page_cellButton.isSeperatorLineRequired = YES;
    
    self.checkBox = [CS_Page_CheckBox page_CheckBoxWithTitle:@"企业状态：正常" isChecked:YES swtichOnHandler:^(CS_Page_CheckBox *page_CheckBox) {
        [weakSelf.checkBox refreshContent:@"企业状态：正常"];
    } switchOffHandler:^(CS_Page_CheckBox *page_CheckBox) {
        [weakSelf.checkBox refreshContent:@"企业状态：停业"];
    }];
    
    CS_Page_TextFieldView *test_CS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"测试标题" keyboardType:UIKeyboardTypeDefault data:@""];
    test_CS_Page_TextFieldView.displayPlaceHolder = @"低筋粉if管理";
    test_CS_Page_TextFieldView.textFieldType = CSTextFieldType_DateTime;
    primaryY = [test_CS_Page_TextFieldView layoutView:self.view primaryY:primaryY + 20] + 20;
    primaryY = [page_cellButton layoutView:self.scrollView primaryY:primaryY];
    
    CS_Page_TabbarContainerView *page_CS_Page_TabbarContainerView = [CS_Page_TabbarContainerView page_TabbarContainerView:@[@"检查项录入", @"信息采集"] needHeight:kWindowH / 2.0];
    primaryY = [page_CS_Page_TabbarContainerView layoutView:self.scrollView primaryY:primaryY];
    
    CGFloat primaryY1 = 0.0;
    UIScrollView *subScrollView = [page_CS_Page_TabbarContainerView getSuperPanelByIndex:0];

    CS_Page_Button *page_Button = [CS_Page_Button new];
    page_Button.buttonName = @"测试";
    page_Button.clickHandler = ^{
        
        weakSelf.page_Button1.clickEnable = NO;
        
    };
    
    self.page_Button1 = [CS_Page_Button new];
    self.page_Button1.buttonName = @"被测试";
    self.page_Button1.clickHandler = ^{
        
        CSSelectableModel *model1 = [CSSelectableModel new];
        model1.code = @"0001";
        model1.content = @"测试选项1";
        
        CSSelectableModel *model2 = [CSSelectableModel new];
        model2.code = @"0001";
        model2.content = @"测试选项1,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项";
        
        CSSelectableModel *model3 = [CSSelectableModel new];
        model3.code = @"0003";
        model3.content = @"测试选项3";
        
        CSSelectableModel *model4 = [CSSelectableModel new];
        model4.code = @"0004";
        model4.content = @"测试选项4,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项,超长测试项";
        
        CSSelectableModel *model5 = [CSSelectableModel new];
        model5.code = @"0001";
        model5.content = @"测试选项5,超长测试项,超长测试项,超长测试项";
        
        CSSelectableModel *model6 = [CSSelectableModel new];
        model6.code = @"0006";
        model6.content = @"测试选项6";
        
        
        CSSelectableModel *model31 = [CSSelectableModel new];
        model31.code = @"00031";
        model31.content = @"测试选项31";

        CSSelectableModel *model32 = [CSSelectableModel new];
        model32.code = @"00032";
        model32.content = @"测试选项32";

        CSSelectableModel *model33 = [CSSelectableModel new];
        model33.code = @"00033";
        model33.content = @"测试选项33";

        CSSelectableModel *model34 = [CSSelectableModel new];
        model34.code = @"00034";
        model34.content = @"测试选项34";

        CSSelectableModel *model35 = [CSSelectableModel new];
        model35.code = @"00035";
        model35.content = @"测试选项35";
        
        model3.subItems = @[model31, model32, model33, model34, model35];
        
        CS_Page_MultitpleSelectView *page_MultitpleSelectView = [CS_Page_MultitpleSelectView page_MultitpleSelectView:@"请选择" selectItems:@[model1, model2, model3, model4, model5, model6] savedHandler:^(NSString *selectedNamesString, NSString *selectedCodesString) {
            
            NSLog(@"selectedNamesString:%@", selectedNamesString);
            NSLog(@"selectedCodesString:%@", selectedCodesString);
            
        }];
        [page_MultitpleSelectView popShow:weakSelf];
        
    };
    primaryY1 = [page_Button layoutView:subScrollView primaryY:primaryY1];
    primaryY1 = [self.page_Button1 layoutView:subScrollView primaryY:primaryY1];
    
    CS_Page_SectionTitleView *sectionTitel = [CS_Page_SectionTitleView page_SectionTitleView:@"s时刻到了疯狂的时刻到了疯狂时刻到了疯狂时刻到了疯狂时刻到了疯狂时刻到了疯狂时刻到了疯狂时刻到了疯狂时刻到了疯狂时刻到了疯狂时刻到了疯狂时刻到了疯狂时刻到了疯狂" color:COLOR_THEME image:nil];
    sectionTitel.rightMargin = 100;
    primaryY1 = [sectionTitel layoutView:subScrollView primaryY:primaryY1];
    
    CS_Page_TextView *qymc_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_0] textColor:COLOR_TEXT_1 content:@"腾讯科技（北京）有限公司" textAlignment:NSTextAlignmentLeft];
    qymc_CS_Page_TextView.leftMargin = 100.0;
    qymc_CS_Page_TextView.rightMargin = 50.0;
    CS_Page_TextView *fddbr_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_1] textColor:COLOR_TEXT_2 content:@"法定代表人：罗会全" textAlignment:NSTextAlignmentLeft];
    CS_Page_TextView *zch_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_1] textColor:COLOR_TEXT_2 content:@"注册号：33108460081188" textAlignment:NSTextAlignmentLeft];
    CS_Page_TextView *qylx_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_1] textColor:COLOR_TEXT_2 content:@"企业类型：个体工商户" textAlignment:NSTextAlignmentLeft];
    CS_Page_TextView *lxdh_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_1] textColor:COLOR_TEXT_2 content:@"电话：15658197128" textAlignment:NSTextAlignmentRight];
    CS_Page_TextView *zczb_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_1] textColor:COLOR_TEXT_2 content:@"注册资本：2(万元)" textAlignment:NSTextAlignmentLeft];
    CS_Page_TextView *zlrq_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_1] textColor:COLOR_TEXT_2 content:@"成立日期：2015-09-25" textAlignment:NSTextAlignmentLeft];
    
    CS_Page_TextView *jyfw_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_1] textColor:COLOR_TEXT_2 content:@"经营范围：餐饮服务业：小吃店，不含凉菜，不含裱花蛋糕，不含生产食海产品（仅限使用清洁能源且无油烟生产的小吃店）（上述经营范围中涉及前置审批项目的，在批准的有效期内方可经营）" textAlignment:NSTextAlignmentLeft];
    
    UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"qy_bg.png"]];
    
    primaryY = [qymc_CS_Page_TextView layoutView:self.scrollView primaryY:primaryY];
    primaryY += 5;
    
    [fddbr_CS_Page_TextView layoutView:self.scrollView primaryY:primaryY];
    primaryY = [lxdh_CS_Page_TextView layoutView:self.scrollView primaryY:primaryY];
    primaryY = [zch_CS_Page_TextView layoutView:self.scrollView primaryY:primaryY];
    primaryY = [qylx_CS_Page_TextView layoutView:self.scrollView primaryY:primaryY];
    primaryY = [zczb_CS_Page_TextView layoutView:self.scrollView primaryY:primaryY];
    primaryY = [zlrq_CS_Page_TextView layoutView:self.scrollView primaryY:primaryY];
    
    imageView.frame = CGRectMake(kWindowW - CELL_EDIT_RIGHT_MARGIN - IMAGE_WIDTH, primaryY - IMAGE_HEIGHT, IMAGE_WIDTH, IMAGE_HEIGHT);
    [self.scrollView addSubview:imageView];
    
    primaryY = [jyfw_CS_Page_TextView layoutView:self.scrollView primaryY:primaryY];
    
    
    CS_Page_SectionTitleView *sep_CS_Page_SectionTitleView = [CS_Page_SectionTitleView page_SectionTitleView:@"" color:nil image:nil];
    CS_Page_SectionTitleView *sep2_CS_Page_SectionTitleView = [CS_Page_SectionTitleView page_SectionTitleView:@"" color:nil image:nil];
//    CS_Page_SectionTitleView *sep3_CS_Page_SectionTitleView = [CS_Page_SectionTitleView page_SectionTitleView:@"" color:nil image:nil];
    CS_Page_TextFieldView *address_CS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"企业地址" keyboardType:UIKeyboardTypeDefault data:@"浙江省舟山市花园路10号"];
    
//    address_CS_Page_TextFieldView.leftMargin = 100.0;
//    address_CS_Page_TextFieldView.rightMargin = 50.0;
    CS_Page_GpsAddressView *gps_CS_Page_GpsAddressView = [CS_Page_GpsAddressView page_gpsAddressView:@"地理位置" longitude:@"12.21312" latitude:@"30.1321" onAutoLocationClickHandler:^(CS_Page_GpsAddressView *gpsAddressView) {
        
    } onManualLocationClickHandler:^(CS_Page_GpsAddressView *gpsAddressView) {
        
    }];
    
    CS_Page_TextSelectView *ztfl_CS_Page_TextSelectView = [CS_Page_TextSelectView pageTextSelectView:@"主体类型" selectItems:@[@"药品行业", @"食品行业", @"保健食品行业", @"化妆品行业"]];
    ztfl_CS_Page_TextSelectView.value = @"药品行业";
    
    primaryY = [sep_CS_Page_SectionTitleView layoutView:self.scrollView primaryY:primaryY + 10];
    primaryY = [address_CS_Page_TextFieldView layoutView:self.scrollView primaryY:primaryY];
    
    self.scrollView.contentSize = CGSizeMake(0, primaryY);
    
}

/**
 * 布局记录视图
 */
-(void)layoutInputView{
    
    REMOVE_SUBVIEWS(self.scrollView);
    
    CS_Page_SectionTitleView *sep1_CS_Page_SectionTitleView = [CS_Page_SectionTitleView page_SectionTitleView:@"" color:nil image:nil];
    
    CGFloat primaryY = HEIGHT_NAVIGATIONBAR;
    primaryY = [sep1_CS_Page_SectionTitleView layoutView:self.scrollView primaryY:primaryY];
    
    CS_Page_RadioView *jcjg_CS_Page_RadioView = [CS_Page_RadioView pageRadioView:@"检查结果" items:@[@"查无异常", @"异常情况", @"查无下落"] selectedHandler:^(NSInteger selectIndex) {
        
    }];
    primaryY = [jcjg_CS_Page_RadioView layoutView:self.scrollView primaryY:primaryY];
    
    self.scrollView.contentSize = CGSizeMake(0, primaryY);
    
}

-(void)layoutView{
    
}


/**
 *  获得位置信息
 *
 */
-(void)getCurrentLocation{
    
    [self.locationManager requestWhenInUseAuthorization];
    self.isLocationUpdateEnable = YES;
    [self.locationManager startUpdatingLocation];
    
}

-(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)locations{
    
    WS(weakSelf);
    
    CLLocation *cllocation = [locations lastObject];
    
    //结束位置更新
    [self.locationManager stopUpdatingLocation];
    
    self.geocoder = [CLGeocoder new];
    
    [self.geocoder reverseGeocodeLocation:cllocation completionHandler:^(NSArray<CLPlacemark *> * _Nullable placemarks, NSError * _Nullable error) {
        
        if (error == nil) {
            
            CLPlacemark *placemark = [placemarks objectAtIndex:0];
            __block CLPlacemark *weakPlaceMark = placemark;
            
            [CSPlaceModel mj_setupReplacedKeyFromPropertyName:^NSDictionary *{
                return @{
                         @"code" : @"id"
                         };
            }];
            
            [BaseNetManager GET:@"http://apis.map.qq.com/ws/district/v1/list?key=SOKBZ-JL2WP-HDRDL-LPOVA-DK53Q-6ZF6U" parameters:nil completionHandler:^(id responseObj, NSError *error) {
                if (error == nil) {
                    id result = [responseObj objectForKey:@"result"];
                    NSArray *resultArray = [CSPlaceModel mj_objectArrayWithKeyValuesArray:result];
                    CSAddressViewController *addressViewController = [CSAddressViewController new];
                    addressViewController.placeList = resultArray;
                    addressViewController.navigationController.title = @"选择城市";
                    addressViewController.currentGpsAddress = weakPlaceMark;
                    [weakSelf.navigationController pushViewController:addressViewController animated:YES];
                }
            }];
        }
        
    }];
    
    self.isLocationUpdateEnable = NO;
    
}

- (CLLocationManager *)locationManager {
    if(_locationManager == nil) {
        _locationManager = [[CLLocationManager alloc] init];
        
        _locationManager.delegate = self;
        _locationManager.desiredAccuracy = kCLLocationAccuracyBest;
        
    }
    return _locationManager;
}

- (void)viewDidLoad
{
    
    NSLog(@"%lf", HEIGHT_STATUSBAR);
    
    CGFloat primary1sY = 100.0;
    
    CS_Page_RadioView *radio12View=  [CS_Page_RadioView pageRadioViewWithNoDefaultSelected:@"" items:@[@"是", @"否"] selectedHandler:^(NSInteger selectIndex) {
        
    }];
    
    primary1sY = [radio12View layoutView:self.view primaryY:primary1sY];
    
    CS_Page_RadioView *radio13View=  [CS_Page_RadioView pageRadioView:@"" items:@[@"是", @"否"] selectedHandler:^(NSInteger selectIndex) {
        
    }];
    
    primary1sY = [radio13View layoutView:self.view primaryY:primary1sY];
    
    NSLog(@"radioView.value:%@", radio12View.value);
    NSLog(@"radio13View.value:%@", radio13View.value);
    
    return;
    
//    UIScrollView *scrollView = [UIScrollView new];
//    scrollView.frame = CGRectMake(0, 0, kWindowW, HEIGHT_CONTENT);
//    [self.view addSubview:scrollView];
//
//    CGFloat primaryY1 = HEIGHT_NAVIGATIONBAR;
//
//    self.page_informView = [CS_Page_InformView infromView:@[@"似懂非懂手机客户端舒适度更好放大镜看国家队就很关键的风格", @"所得税的空间划分给借款方的好几个汇顶科技泛海国际客户端福建高考的符合客观", @"所得税的空间划分给借款方的好几个汇顶科技泛海国际客户端福建高考的符合客观"]];
//    primaryY1 = [self.page_informView layoutView:self.view primaryY:primaryY1];
//
//    CS_Page_TabbarContainerView *test_CS_Page_TabbarContainerView = [CS_Page_TabbarContainerView page_TabbarContainerView:@[@"查询统计", @"日常监管", @"行政执法", @"辅助办公"] needHeight:kWindowH - primaryY1];
//    [test_CS_Page_TabbarContainerView layoutView:self.view primaryY:primaryY1];
//
//    return;
//
    [[UIApplication sharedApplication] statusBarFrame];

    [self.navigationController setNavigationBarHidden:YES animated:NO];
    
//
//
//    CS_Page_TextFieldView *sjmc_CS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"事件名称" keyboardType:UIKeyboardTypeDefault data:@""];
//    CS_Page_TextFieldView *fxrxm_CS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"发现人姓名" keyboardType:UIKeyboardTypeDefault data:@"12312"];
//    CS_Page_TextFieldView *zydsr_CS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"主要当事人" keyboardType:UIKeyboardTypeDefault data:@""];
//    CS_Page_TextSelectView *sjlx_CS_Page_TextSelectView = [CS_Page_TextSelectView pageTextSelectView:@"事件类型" selectItems:@[@"32424", @"234234", @"123123"]];
//    CS_Page_TextFieldView *fxsj_CS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"发现时间" keyboardType:UIKeyboardTypeDefault data:@"asasfd"];
//    fxsj_CS_Page_TextFieldView.textFieldType = CSTextFieldType_DateTime;
//    CS_Page_TextSelectView *lyfs_CS_Page_TextSelectView = [CS_Page_TextSelectView pageTextSelectView:@"来源方式" selectItems:@[@"32424", @"234234", @"123123"]];
//    CS_Page_TextSelectView *xzjd_CS_Page_TextSelectView = [CS_Page_TextSelectView pageTextSelectView:@"乡镇街道" selectItems:@[@"32424", @"234234", @"123123"]];
//    CS_Page_TextFieldView *jtdz_CS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"具体地址" keyboardType:UIKeyboardTypeDefault data:@""];
//    CS_Page_TextFieldView *sjms_CS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"事件描述" keyboardType:UIKeyboardTypeDefault data:@""];
//    CS_Page_TextFieldView *bz_CS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"备注" keyboardType:UIKeyboardTypeDefault data:@""];
//    CS_Page_Button *save_CS_Page_Button = [CS_Page_Button new];
//    save_CS_Page_Button.buttonName = @"保存";
//    save_CS_Page_Button.clickHandler = ^{
//
//    };
//
//    primaryY = [sjmc_CS_Page_TextFieldView layoutView:scrollView primaryY:primaryY];
//    primaryY = [fxrxm_CS_Page_TextFieldView layoutView:scrollView primaryY:primaryY];
//    primaryY = [zydsr_CS_Page_TextFieldView layoutView:scrollView primaryY:primaryY];
//    primaryY = [sjlx_CS_Page_TextSelectView layoutView:scrollView primaryY:primaryY];
//    primaryY = [fxsj_CS_Page_TextFieldView layoutView:scrollView primaryY:primaryY];
//    primaryY = [lyfs_CS_Page_TextSelectView layoutView:scrollView primaryY:primaryY];
//    primaryY = [xzjd_CS_Page_TextSelectView layoutView:scrollView primaryY:primaryY];
//    primaryY = [jtdz_CS_Page_TextFieldView layoutView:scrollView primaryY:primaryY];
//    primaryY = [sjms_CS_Page_TextFieldView layoutView:scrollView primaryY:primaryY];
//    primaryY = [bz_CS_Page_TextFieldView layoutView:scrollView primaryY:primaryY];
//    primaryY = [[CS_Page_SpaceView new] layoutView:scrollView primaryY:primaryY];
//    primaryY = [save_CS_Page_Button layoutView:scrollView primaryY:primaryY];
//
//
//    //字体大小演示
//    CS_Page_SectionTitleView *font_size_CS_Page_SectionTitleView = [CS_Page_SectionTitleView page_SectionTitleView:@"字体大小" color:COLOR_TEXT_2 image:nil];
//    CS_Page_TextView *font_size_0_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_0] textColor:COLOR_TEXT_2 content:@"字体大小：#define FONT_SIZE_0 18.0" textAlignment:NSTextAlignmentLeft];
//    CS_Page_TextView *font_size_1_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_1] textColor:COLOR_TEXT_2 content:@"字体大小：#define FONT_SIZE_1 15.0" textAlignment:NSTextAlignmentLeft];
//    CS_Page_TextView *font_size_2_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_2] textColor:COLOR_TEXT_2 content:@"字体大小：#define FONT_SIZE_0 14.0" textAlignment:NSTextAlignmentLeft];
//    CS_Page_TextView *font_size_3_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_3] textColor:COLOR_TEXT_2 content:@"字体大小：#define FONT_SIZE_0 13.0" textAlignment:NSTextAlignmentLeft];
//
//    //字体颜色演示
//    CS_Page_SectionTitleView *font_color_CS_Page_SectionTitleView = [CS_Page_SectionTitleView page_SectionTitleView:@"字体颜色" color:COLOR_TEXT_2 image:nil];
//    CS_Page_TextView *font_color_0_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_1] textColor:COLOR_TEXT_0 content:@"字体颜色：#define COLOR_TEXT_0 [UIColor colorFromHexCode:#000000]" textAlignment:NSTextAlignmentLeft];
//    CS_Page_TextView *font_color_1_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_1] textColor:COLOR_TEXT_1 content:@"字体颜色：#define COLOR_TEXT_1 [UIColor colorFromHexCode:#333333]" textAlignment:NSTextAlignmentLeft];
//    CS_Page_TextView *font_color_2_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_1] textColor:COLOR_TEXT_2 content:@"字体颜色：#define COLOR_TEXT_2 [UIColor colorFromHexCode:#666666]" textAlignment:NSTextAlignmentLeft];
//    CS_Page_TextView *font_color_3_CS_Page_TextView = [CS_Page_TextView page_textViewWithFont:[UIFont systemFontOfSize:FONT_SIZE_1] textColor:COLOR_TEXT_3 content:@"字体颜色：#define COLOR_TEXT_3 [UIColor colorFromHexCode:#999999]" textAlignment:NSTextAlignmentLeft];
//
//    primaryY = [font_size_CS_Page_SectionTitleView layoutView:scrollView primaryY:primaryY];
//    primaryY = [[CS_Page_SpaceView new] layoutView:scrollView primaryY:primaryY];
//    primaryY = [font_size_0_CS_Page_TextView layoutView:scrollView primaryY:primaryY];
//    primaryY = [font_size_1_CS_Page_TextView layoutView:scrollView primaryY:primaryY];
//    primaryY = [font_size_2_CS_Page_TextView layoutView:scrollView primaryY:primaryY];
//    primaryY = [font_size_3_CS_Page_TextView layoutView:scrollView primaryY:primaryY];
//
//    primaryY = [font_color_CS_Page_SectionTitleView layoutView:scrollView primaryY:primaryY];
//    primaryY = [[CS_Page_SpaceView new] layoutView:scrollView primaryY:primaryY];
//    primaryY = [font_color_0_CS_Page_TextView layoutView:scrollView primaryY:primaryY];
//    primaryY = [font_color_1_CS_Page_TextView layoutView:scrollView primaryY:primaryY];
//    primaryY = [font_color_2_CS_Page_TextView layoutView:scrollView primaryY:primaryY];
//    primaryY = [font_color_3_CS_Page_TextView layoutView:scrollView primaryY:primaryY];
//
//    scrollView.contentSize = CGSizeMake(0, primaryY);
//
//
//
//
//
//
//    return;
//
////    CS_Page_TabbarContainerView *tabbarContainerView = [CS_Page_TabbarContainerView page_TabbarContainerView:@[@"是的范德萨发的方式", @"是否第三方第三方"] needHeight:200];
////
////    [tabbarContainerView layoutView:self.view primaryY:100];
////
////
////    return;
//
//
//
////    WS(weakSelf);
////    CSSelectableModel *selectableModel111 = [CSSelectableModel new];
////    selectableModel111.code = @"1";
////    selectableModel111.content = @"自定义标签测试1自定义标签测试1自定义标签测试1自定义标签测试1自定义标签测试1自定义标签测试1自定义标签测试1自定义标签测试1自定义标签测试1";
////    selectableModel111.color = @"ff0000";
////
////    CSSelectableModel *selectableModel2111 = [CSSelectableModel new];
////    selectableModel2111.code = @"2";
////    selectableModel2111.content = @"自定义标签测试2自定义标签测试2自定义标签测试2自";
////    selectableModel2111.color = @"00ff00";
////
////    CSSelectableModel *selectableModel311 = [CSSelectableModel new];
////    selectableModel311.code = @"3";
////    selectableModel311.content = @"自定义标签测试3自定义标签测试3自";
////    selectableModel311.color = @"0000ff";
////
////    CS_Page_TextSelectView *page_TextSelectView = [CS_Page_TextSelectView pageTextSelectView:@"选择测试" selectItems:@[selectableModel2111, selectableModel311, selectableModel111, selectableModel311, selectableModel2111, selectableModel2111, selectableModel2111, selectableModel2111]];
////    //    page_TextSelectView.isMutiltpleSelect = YES;
////    page_TextSelectView.superViewController = self;
////    page_TextSelectView.selectEmptyErrorHandler = ^(UIViewController *superViewController){
////
////        [CS_Pop_ToastView showWithMessage:@"请先选择乡镇街道！" superView:superViewController.view];
////        NSLog(@"ceshshisidfd");
////    };
////    __block CS_Page_TextSelectView *weakCS_Page_TextSelectView = page_TextSelectView;
////    page_TextSelectView.selectHandler2 = ^(NSInteger section, NSInteger index, CSSelectableModel *model) {
////
////        //        if ([model.code isEqualToString:@"1"]) {
////        //            weakCS_Page_TextSelectView.selectItems = @[selectableModel2111];
////        //        }else if ([model.code isEqualToString:@"2"]){
////        //            weakCS_Page_TextSelectView.selectItems = @[selectableModel311];
////        //        }else if ([model.code isEqualToString:@"3"]){
////        //            weakCS_Page_TextSelectView.selectItems = @[selectableModel111];
////        //        }
////
////    };
////
////    CS_Page_TextSelectView *page_TextSelectView1 = [CS_Page_TextSelectView pageTextSelectView:@"选择测试1" selectItems:@[selectableModel111, selectableModel2111, selectableModel311]];
////
////    CS_Page_TextSelectView *page_TextSelectView2 = [CS_Page_TextSelectView pageTextSelectView:@"选择测试2" selectItems:@[selectableModel111, selectableModel2111, selectableModel311]];
////
////    CS_Page_TextSelectView *page_TextSelectView3 = [CS_Page_TextSelectView pageTextSelectView:@"选择测试3" selectItems:@[selectableModel111, selectableModel2111, selectableModel311]];
////
////    CS_Page_TextSelectView *page_TextSelectView4 = [CS_Page_TextSelectView pageTextSelectView:@"选择测试4" selectItems:@[selectableModel111, selectableModel2111, selectableModel311]];
////
////    CGFloat testPrimaryY = 100.0;
////    testPrimaryY = [page_TextSelectView layoutView:self.view primaryY:testPrimaryY];
////    testPrimaryY = [page_TextSelectView1 layoutView:self.view primaryY:testPrimaryY];
////    testPrimaryY = [page_TextSelectView2 layoutView:self.view primaryY:testPrimaryY];
////    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, testPrimaryY - 10, kWindowW, 100)];
////    view.backgroundColor = [UIColor redColor];
////    [self.view addSubview:view];
////
////    testPrimaryY = [page_TextSelectView3 layoutView:self.view primaryY:testPrimaryY];
////    UIView *view1 = [[UIView alloc] initWithFrame:CGRectMake(100, testPrimaryY, kWindowW, 100)];
////    view1.backgroundColor = [UIColor greenColor];
////    [self.view addSubview:view1];
////    testPrimaryY = testPrimaryY + 100;
////    testPrimaryY = [page_TextSelectView4 layoutView:self.view primaryY:testPrimaryY];
////
////    return;
//    //
////    [self layoutRcjc_QyxxView:nil];
////
////    return;
////
////
////
////    NSMutableDictionary *params = [NSMutableDictionary new];
////
////    [params setObject:@"NUwrZDZabXA" forKey:@"mitem"];
////    [params setObject:@"1" forKey:@"qylx"];
////    [params setObject:@"330122" forKey:@"regorg"];
////
////    [HttpHelper sendDataUrl:@"http://10.1.10.128:8848/zndj/zndj.do/method=client_multipleQueryLitem" parameters:params completionHandler:^(id responseObj, NSError *error) {
////        NSLog(@"%@", responseObj);
////    }];
////
////    [super viewDidLoad];
////
////    return;
//
////    [self getCurrentLocation];
////
////    return;
//
//
////    CS_Page_TextFieldView *lxrCS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"联系人" keyboardType:UIKeyboardTypeDefault data:@"34345345"];
////    lxrCS_Page_TextFieldView.textFieldType = CSTextFieldType_UserName;
////    [lxrCS_Page_TextFieldView layoutView:self.view primaryY:100.0];
////    return;
////
////
////    CGFloat primaryYY = 100.0;
//
////    CS_Page_TextFieldView *pageTextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"jhgsajdjsa" keyboardType:UIKeyboardTypeDefault data:@"客户更开放的空间规划空间发的"];
////    primaryYY = [pageTextFieldView layoutView:self.view primaryY:primaryYY];
//
//
//
//
//    CSSelectableModel *selectableModel91 = [CSSelectableModel new];
//    selectableModel91.content = @"与if都是覅一月份的1";
//    selectableModel91.code = @"付电话费看电视快放假回家看到回复1";
//
//    CSSelectableModel *selectableModel911 = [CSSelectableModel new];
//    selectableModel911.content = @"后方可实施地方11";
//    selectableModel911.code = @"世纪东方好客山东11";
//
//    CSSelectableModel *selectableModel912 = [CSSelectableModel new];
//    selectableModel912.content = @"护肤开始计划的方式咖啡馆12";
//    selectableModel912.code = @"不会的风格更开放12";
//
//    selectableModel91.subItems = @[selectableModel911, selectableModel912];
//
//    CSSelectableModel *selectableModel92 = [CSSelectableModel new];
//    selectableModel92.content = @"额hi户外防水电话覅㛑2";
//    selectableModel92.code = @"带你飞几个地方你看过2";
//
//    CSSelectableModel *selectableModel921 = [CSSelectableModel new];
//    selectableModel921.content = @"复核后反而合格21";
//    selectableModel921.code = @"我就日哦出21";
//
//    selectableModel92.subItems = @[selectableModel921];
//
//    CS_Page_TextSelectView *page_TextSelectView = [CS_Page_TextSelectView pageTextSelectView:@"代付款挂号费" selectItems:@[selectableModel91, selectableModel92]];
//    page_TextSelectView.isMutiltpleSelect = YES;
//    page_TextSelectView.superViewController = self;
//    page_TextSelectView.contentValue = @"活动和空间的设计开发活动空间房价肯定是空间发挥的伤口就会疯狂的首付款计划独守空房几乎都是快捷回复都是尽快发货快接电话客服";
//
//    [page_TextSelectView layoutView:self.view primaryY:100];
//
////    CS_Page_TextSelectView *page_TextSelectView1 = [CS_Page_TextSelectView pageTextSelectView:@"代付款挂号费" selectItems:@[selectableModel91, selectableModel92]];
////    page_TextSelectView1.isMutiltpleSelect = YES;
////    page_TextSelectView1.superViewController = self;
////    page_TextSelectView1.contentValue = @"活动和空间的设计开发活动空间房价肯定是空间发挥的伤口就会疯狂的首付款计划独守空房几乎都是快捷回复都是尽快发货快接电话客服";
////    page_TextSelectView1.seperateKeyString = @",";
////
////    primaryYY = [page_TextSelectView1 layoutView:self.view primaryY:primaryYY];
//
//    return;
//
//
//    CS_Page_TextFieldView *pageTextFieldView1 = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"多大事故" keyboardType:UIKeyboardTypeDefault data:@"而韩国看看凤凰科技"];
//    pageTextFieldView1.textFieldType = CSTextFieldType_Click;
//    primaryYY = [pageTextFieldView1 layoutView:self.view primaryY:primaryYY];
//
//    return;
    
    
    
//    CS_Page_Button *page_button = [CS_Page_Button new];
//    page_button.buttonName = @"电光火石国际快递";
//    page_button.leftMargin = 10;
//    page_button.rightMargin = 100;
//
//    CS_Page_Button *page_button2 = [CS_Page_Button new];
//    page_button2.buttonName = @"dfsdghjkd";
//
//
//    CGFloat primaryY1 = [page_button layoutView:self.view primaryY:primaryY1];
//    primaryY1 = [page_button2 layoutView:self.view primaryY:primaryY1];
//
//    return;
    
    
    
//    CSSelectableModel *selectableModel = [CSSelectableModel new];
//    selectableModel.content = @"未发现问题或相关问题已规范、已改正，无需后续处置";
//    selectableModel.isEnabled = NO;
//    selectableModel.isSelected = YES;
//
//    CSSelectableModel *selectableModel111 = [CSSelectableModel new];
//    selectableModel111.content = @"停止检查，反馈至日常监管部门依法依规处理";
//    selectableModel111.isEnabled = YES;
//    selectableModel111.isSelected = YES;
//
//    CSSelectableModel *selectableModel222 = [CSSelectableModel new];
//    selectableModel222.content = @"违反本部门相关规定，责令限期整改；后续跟踪由日常监管部门负责";
//    selectableModel222.isEnabled = YES;
//    selectableModel222.isSelected = YES;
//
//    CSSelectableModel *selectableModel223 = [CSSelectableModel new];
//    selectableModel223.content = @"发现案件线索，初步固定相关证据后移送办案机构依法依规处理";
//    selectableModel223.isEnabled = YES;
//    selectableModel223.isSelected = YES;
//
//    CSSelectableModel *selectableModel224 = [CSSelectableModel new];
//    selectableModel224.content = @"违反其他部门相关规定，抄告其他部门";
//    selectableModel224.isEnabled = YES;
//    selectableModel224.isSelected = YES;
//
//    CSSelectableModel *selectableModel256 = [CSSelectableModel new];
//    selectableModel256.content = @"违反其他相";
//    selectableModel256.isEnabled = YES;
//    selectableModel256.isSelected = YES;
//
//    CGFloat radioprimaryY = 40.0;
////
////    CS_Page_RadioView *page_RadioView = [CS_Page_RadioView pageRadioView:@"" items:@[selectableModel224, selectableModel224, selectableModel224, selectableModel224] selectableHandler:^(CSSelectableModel *selectableModel) {
////
////    }];
////    radioprimaryY = [page_RadioView layoutView:self.view primaryY:radioprimaryY];
//
//    CS_Page_RadioView *page_RadioView2 = [CS_Page_RadioView pageRadioView:@"" items:@[selectableModel256, selectableModel256, selectableModel, selectableModel111, selectableModel222, selectableModel256, selectableModel256] selectableHandler:^(CSSelectableModel *selectableModel) {
//
//    }];
//    page_RadioView2.isMulityEnable = YES;
//    radioprimaryY = [page_RadioView2 layoutView:self.view primaryY:radioprimaryY];
    
//    return;
    
    
    
    
    
    CS_Page_QueryPanelView *queryPanel = [CS_Page_QueryPanelView new];
    
    CSQueryModuleModel *queryModel1 = [CSQueryModuleModel new];
    queryModel1.queryModuleName = @"";
    
    CSQueryModuleModel *queryModel2 = [CSQueryModuleModel new];
    queryModel2.queryModuleName = @"许可证";
    
    CSQueryModuleModel *queryModel3 = [CSQueryModuleModel new];
    queryModel3.queryModuleName = @"商标";
    
    CSQueryModuleModel *queryModel4 = [CSQueryModuleModel new];
    queryModel4.queryModuleName = @"法律法规";
    
    
    //主体查询
    CSConditionModel *conditionModel = [CSConditionModel new];
    conditionModel.name = @"";
    conditionModel.placeHolder = @"";
    conditionModel.type = CSViewType_PageTextFieldView;
    conditionModel.keyCode = @"qymc";
    conditionModel.queryConditionDisplayMode = CSQueryConditionDisplayMode_InputText;
    
    CSConditionModel *conditionModel2 = [CSConditionModel new];
    conditionModel2.name = @"统一社会信用代码/注册号";
    conditionModel2.placeHolder = @"注册号";
    conditionModel2.type = CSViewType_PageTextFieldView;
    conditionModel2.keyCode = @"zch";
    conditionModel2.queryConditionDisplayMode = CSQueryConditionDisplayMode_InputText;
    
    CSConditionModel *conditionModel3 = [CSConditionModel new];
    conditionModel3.name = @"法定代表人";
    conditionModel3.placeHolder = @"法定代表人";
    conditionModel3.type = CSViewType_PageTextFieldView;
    conditionModel3.keyCode = @"fddbr";
    conditionModel3.queryConditionDisplayMode = CSQueryConditionDisplayMode_InputText;
    
    CSConditionModel *conditionModel4 = [CSConditionModel new];
    conditionModel4.name = @"住所";
    conditionModel4.placeHolder = @"住所";
    conditionModel4.type = CSViewType_PageTextFieldView;
    conditionModel4.keyCode = @"zs";
    conditionModel4.queryConditionDisplayMode = CSQueryConditionDisplayMode_InputText;
    
    CSConditionModel *conditionModel5 = [CSConditionModel new];
    conditionModel5.name = @"成立日期";
    conditionModel5.placeHolder = @"成立日期";
    conditionModel5.type = CSViewType_TimeRangeView;
    conditionModel5.keyCode = @"clrq";
    conditionModel5.queryConditionDisplayMode = CSQueryConditionDisplayMode_Default;
    
    CSConditionModel *conditionModel51 = [CSConditionModel new];
    conditionModel51.name = @"成立日期2";
    conditionModel51.placeHolder = @"成立日期2";
    conditionModel51.type = CSViewType_TimeRangeView;
    conditionModel51.keyCode = @"clrq";
    conditionModel51.queryConditionDisplayMode = CSQueryConditionDisplayMode_Default;
    
    CSConditionModel *conditionModel6 = [CSConditionModel new];
    conditionModel6.name = @"主体分类";
    conditionModel6.placeHolder = @"主体分类";
    conditionModel6.type = CSViewType_PageSingleView;
    conditionModel6.keyCode = @"clrq";
    conditionModel6.queryConditionDisplayMode = CSQueryConditionDisplayMode_ResultFilterLine;
    
    CSSelectableModel *selectableModel1 = [CSSelectableModel new];
    selectableModel1.content = @"食品行业";
    selectableModel1.code = @"1";
    selectableModel1.image = [UIImage imageNamed:@"ic_tushi_1.png"];
    
    CSSelectableModel *selectableModel11 = [CSSelectableModel new];
    selectableModel11.content = @"食品生产企业";
    selectableModel11.code = @"11";
    
    CSSelectableModel *selectableModel12 = [CSSelectableModel new];
    selectableModel12.content = @"食品经营企业";
    selectableModel12.code = @"12";
    
    selectableModel1.subItems = @[selectableModel11, selectableModel12];
    
    
    
    CSSelectableModel *selectableModel2 = [CSSelectableModel new];
    selectableModel2.content = @"药品行业";
    selectableModel2.code = @"2";
    selectableModel2.image = [UIImage imageNamed:@"ic_tushi_2.png"];
    
    CSSelectableModel *selectableModel21 = [CSSelectableModel new];
    selectableModel21.content = @"药品生产企业";
    selectableModel21.code = @"21";
    
    CSSelectableModel *selectableModel22 = [CSSelectableModel new];
    selectableModel22.content = @"药品经营企业";
    selectableModel22.code = @"22";
    
    CSSelectableModel *selectableModel23 = [CSSelectableModel new];
    selectableModel23.content = @"药品零售企业";
    selectableModel23.code = @"23";
    
    CSSelectableModel *selectableModel24 = [CSSelectableModel new];
    selectableModel24.content = @"药品使用企业";
    selectableModel24.code = @"24";
    
    CSSelectableModel *selectableModel25 = [CSSelectableModel new];
    selectableModel25.content = @"制剂生产企业";
    selectableModel25.code = @"25";
    
    selectableModel2.subItems = @[selectableModel21, selectableModel22, selectableModel23, selectableModel24, selectableModel25];
    
    CSSelectableModel *selectableModel3 = [CSSelectableModel new];
    selectableModel3.content = @"保健食品行业";
    selectableModel3.code = @"3";
    selectableModel3.image = [UIImage imageNamed:@"ic_tushi_3.png"];
    
    CSSelectableModel *selectableModel31 = [CSSelectableModel new];
    selectableModel31.content = @"保健食品生产企业";
    selectableModel31.code = @"31";
    
    CSSelectableModel *selectableModel32 = [CSSelectableModel new];
    selectableModel32.content = @"保健食品批发单位";
    selectableModel32.code = @"32";
    
    CSSelectableModel *selectableModel33 = [CSSelectableModel new];
    selectableModel33.content = @"保健食品专卖店（柜）";
    selectableModel33.code = @"33";
    
    CSSelectableModel *selectableModel34 = [CSSelectableModel new];
    selectableModel34.content = @"兼营保健食品的超市（卖场）";
    selectableModel34.code = @"34";
    
    CSSelectableModel *selectableModel35 = [CSSelectableModel new];
    selectableModel35.content = @"兼营保健食品的药店";
    selectableModel35.code = @"35";
    
    CSSelectableModel *selectableModel36 = [CSSelectableModel new];
    selectableModel36.content = @"兼营保健食品的食杂店";
    selectableModel36.code = @"36";
    
    CSSelectableModel *selectableModel37 = [CSSelectableModel new];
    selectableModel37.content = @"兼营保健食品的食杂店";
    selectableModel37.code = @"37";
    
    CSSelectableModel *selectableModel38 = [CSSelectableModel new];
    selectableModel38.content = @"兼营保健食品的食杂店";
    selectableModel38.code = @"38";
    
    CSSelectableModel *selectableModel39 = [CSSelectableModel new];
    selectableModel39.content = @"兼营保健食品的食杂店";
    selectableModel39.code = @"39";
    
    
    CSSelectableModel *selectableModel40 = [CSSelectableModel new];
    selectableModel40.content = @"兼营保健食品的食杂店";
    selectableModel40.code = @"40";
    
    
    CSSelectableModel *selectableModel41 = [CSSelectableModel new];
    selectableModel41.content = @"兼营保健食品的食杂店";
    selectableModel41.code = @"41";
    
    
    CSSelectableModel *selectableModel42 = [CSSelectableModel new];
    selectableModel42.content = @"兼营保健食品的食杂店";
    selectableModel42.code = @"42";
    
    
    CSSelectableModel *selectableModel43 = [CSSelectableModel new];
    selectableModel43.content = @"兼营保健食品的食杂店";
    selectableModel43.code = @"43";
    
    CSSelectableModel *selectableModel44 = [CSSelectableModel new];
    selectableModel44.content = @"兼营保健食品的食杂店";
    selectableModel44.code = @"44";
    
    selectableModel3.subItems = @[selectableModel31, selectableModel32, selectableModel33, selectableModel34];
    conditionModel6.selectItems = @[selectableModel1, selectableModel2, selectableModel3, selectableModel3, selectableModel3, selectableModel3];
    
    
    CSConditionModel *conditionModel7 = [CSConditionModel new];
    conditionModel7.name = @"距离";
    conditionModel7.placeHolder = @"距离";
    conditionModel7.type = CSViewType_PageSingleView;
    conditionModel7.queryConditionDisplayMode = CSQueryConditionDisplayMode_ResultFilterLine;
    conditionModel7.keyCode = @"jl";
    conditionModel7.selectItems = @[@"不限", @"500米内"];
    
    CSSelectableModel *selectableModelS1 = [CSSelectableModel new];
    selectableModelS1.content = @"浙江省";
    selectableModelS1.code = @"1";
    
    CSSelectableModel *selectableModelS11 = [CSSelectableModel new];
    selectableModelS11.content = @"杭州市";
    selectableModelS11.code = @"11";
    
    CSSelectableModel *selectableModelS12 = [CSSelectableModel new];
    selectableModelS12.content = @"台州市";
    selectableModelS12.code = @"12";
    
    CSSelectableModel *selectableModelS13 = [CSSelectableModel new];
    selectableModelS13.content = @"温州市";
    selectableModelS13.code = @"13";
    
    CSSelectableModel *selectableModelS14 = [CSSelectableModel new];
    selectableModelS14.content = @"绍兴市";
    selectableModelS14.code = @"14";
    
    CSSelectableModel *selectableModelS15 = [CSSelectableModel new];
    selectableModelS15.content = @"湖州市";
    selectableModelS15.code = @"14";
    
    CSSelectableModel *selectableModelS16 = [CSSelectableModel new];
    selectableModelS16.content = @"丽水市";
    selectableModelS16.code = @"15";
    
    CSSelectableModel *selectableModelS17 = [CSSelectableModel new];
    selectableModelS17.content = @"嘉兴市";
    selectableModelS17.code = @"16";
    
    CSSelectableModel *selectableModelS18 = [CSSelectableModel new];
    selectableModelS18.content = @"义乌市";
    selectableModelS18.code = @"17";
    
    selectableModelS1.subItems = @[selectableModelS11, selectableModelS12, selectableModelS13, selectableModelS14, selectableModelS15, selectableModelS16, selectableModelS17, selectableModelS18];
    
    
    
    CSSelectableModel *selectableModelS2 = [CSSelectableModel new];
    selectableModelS2.content = @"广东省";
    selectableModelS2.code = @"2";
    
    CSSelectableModel *selectableModelS21 = [CSSelectableModel new];
    selectableModelS21.content = @"广州市";
    selectableModelS21.code = @"21";
    
    CSSelectableModel *selectableModelS22 = [CSSelectableModel new];
    selectableModelS22.content = @"深圳市";
    selectableModelS22.code = @"22";
    
    CSSelectableModel *selectableModelS23 = [CSSelectableModel new];
    selectableModelS23.content = @"珠海市";
    selectableModelS23.code = @"23";
    
    CSSelectableModel *selectableModelS24 = [CSSelectableModel new];
    selectableModelS24.content = @"汕头市";
    selectableModelS24.code = @"24";
    
    CSSelectableModel *selectableModelS25 = [CSSelectableModel new];
    selectableModelS25.content = @"佛山市";
    selectableModelS25.code = @"25";
    
    CSSelectableModel *selectableModelS26 = [CSSelectableModel new];
    selectableModelS26.content = @"韶关市";
    selectableModelS26.code = @"26";
    
    CSSelectableModel *selectableModelS27 = [CSSelectableModel new];
    selectableModelS27.content = @"湛江市";
    selectableModelS27.code = @"27";
    
    CSSelectableModel *selectableModelS28 = [CSSelectableModel new];
    selectableModelS28.content = @"肇庆市";
    selectableModelS28.code = @"28";
    
    CSSelectableModel *selectableModelS29 = [CSSelectableModel new];
    selectableModelS29.content = @"肇庆市";
    selectableModelS29.code = @"29";
    
    selectableModelS2.subItems = @[selectableModelS21, selectableModelS22, selectableModelS23, selectableModelS24, selectableModelS25, selectableModelS26, selectableModelS27, selectableModelS28, selectableModelS29];
    
    queryModel1.queryModuleConditions = @[conditionModel, conditionModel2, conditionModel3, conditionModel4, conditionModel5, conditionModel6, conditionModel7];
    queryModel1.moduleQueryHandler = ^(NSArray *queryConditions, UIView *superView) {
        
        for (int i = 0; i < queryConditions.count; i++) {
            
            CSConditionModel *conditionModel = [queryConditions objectAtIndex:i];
            if (conditionModel.isFocused && 
                conditionModel.isRefreshRequired) {
                conditionModel.isRefreshRequired = NO;
            }
            
            NSLog(@"%@:%@", conditionModel.placeHolder, conditionModel.value);
            
        }
        
    };
    
    //商标查询
    CSConditionModel *conditionModel21 = [CSConditionModel new];
    conditionModel21.name = @"商标名称";
    conditionModel21.placeHolder = @"商标名称";
    conditionModel21.type = CSViewType_PageTextFieldView;
    conditionModel21.keyCode = @"qymc";
    conditionModel21.queryConditionDisplayMode = CSQueryConditionDisplayMode_InputText;
    
    CSConditionModel *conditionModel22 = [CSConditionModel new];
    conditionModel22.name = @"商标类别";
    conditionModel22.placeHolder = @"商标类别";
    conditionModel22.type = CSViewType_PageSingleView;
    conditionModel22.keyCode = @"sblb";
    conditionModel21.queryConditionDisplayMode = CSQueryConditionDisplayMode_ResultFilterLine;
    
    CSConditionModel *conditionModel23 = [CSConditionModel new];
    conditionModel23.name = @"商标注册人";
    conditionModel23.placeHolder = @"商标注册人";
    conditionModel23.type = CSViewType_PageTextFieldView;
    conditionModel23.keyCode = @"sbzcr";
    
    CSSelectableModel *selectableModel211 = [CSSelectableModel new];
    selectableModel211.content = @"驰名商标";
    selectableModel211.code = @"0";
    
    CSSelectableModel *selectableModel212 = [CSSelectableModel new];
    selectableModel212.content = @"著名商标（省）";
    selectableModel212.code = @"1";
    
    CSSelectableModel *selectableModel213 = [CSSelectableModel new];
    selectableModel213.content = @"著名商标（市）";
    selectableModel213.code = @"2";
    
    CSSelectableModel *selectableModel214 = [CSSelectableModel new];
    selectableModel214.content = @"著名商标（县）";
    selectableModel214.code = @"3";
    
    CSSelectableModel *selectableModel215 = [CSSelectableModel new];
    selectableModel215.content = @"知名商号（省）";
    selectableModel215.code = @"7";
    
    CSSelectableModel *selectableModel216 = [CSSelectableModel new];
    selectableModel216.content = @"知名商号（市）";
    selectableModel216.code = @"8";
    
    conditionModel22.selectItems = @[selectableModel211, selectableModel212, selectableModel213, selectableModel214, selectableModel215, selectableModel216];
    
    queryModel3.queryModuleConditions =  @[conditionModel21, conditionModel22, conditionModel23];
    
    queryModel3.moduleQueryHandler = ^(NSArray *queryConditions, UIView *superView) {
//        superView.backgroundColor = [UIColor redColor];
    };
    
    CSConditionModel *conditionModel31 = [CSConditionModel new];
    conditionModel31.name = @"法律法规名称";
    conditionModel31.placeHolder = @"法律法规名称";
    conditionModel31.type = CSViewType_PageTextFieldView;
    conditionModel31.keyCode = @"flfgmc";
    queryModel4.queryModuleConditions = @[conditionModel31];
    
    queryModel1.queryModuleConditions = @[conditionModel];
    
    queryPanel.moduleArray = @[queryModel1];
    
    queryPanel.customSuperViewDisplayHandler = ^CGFloat(CSQueryModuleModel *querymodel, CGFloat primaryY, UIView *superView) {

        CS_Page_SectionTitleView *zdnr_CS_Page_SectionTitleView = [CS_Page_SectionTitleView page_SectionTitleView:@"搜索都是地方坚实的国际法的设计费的说法或第三方滑动解锁返回的数据恢复都是废话收到就好佛挡杀佛活动时间附近的是否好看的设计费历史" color:COLOR_TEXT_1 image:[UIImage imageNamed:@"print_ylj.png"]];
        zdnr_CS_Page_SectionTitleView.isTopSeperatorLineHide = YES;

        primaryY = [zdnr_CS_Page_SectionTitleView layoutView:superView primaryY:primaryY];

        return primaryY + 100;

    };
    
    queryPanel.title = @"农村聚餐备案";
    UIButton *button = [UIButton new];
//    [button setTitle:@"邢增" forState:UIControlStateNormal];
    [button setImage:[UIImage imageNamed:@"tab_cx.png"] forState:UIControlStateNormal];
    queryPanel.rightButton = button;
    
    [queryPanel layoutView:self.view primaryY:0];
    

    
    return;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    NSMutableArray *displayItems = self.displayItemsGlobal;
    
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"CSUIKit" content:@"FOR CENTRALSOFT iOS 2017"]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"xf.wang@centralsoft.com.cn  "]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
//    [displayItems addObject:[CS_Page_CheckBox page_CheckBoxWithTitle:@"为选中" isChecked:YES swtichOnHandler:^(CS_Page_CheckBox *page_CheckBox) {
//        page_CheckBox.title = @"打开";
//        NSLog(@"page_CheckBox:%@", page_CheckBox.value);
//    } switchOffHandler:^(CS_Page_CheckBox *page_CheckBox) {
//        page_CheckBox.title = @"关闭";
//        NSLog(@"page_CheckBox:%@", page_CheckBox.value);
//    }]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"剑气之争" content:nil]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView informWithcontent:@"亦如笑傲江湖中华山剑派的剑气之争，原生和html5的争论一直伴随着移动应用的开发。"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"html5方面在跨平台方面优势明显，但原生应用却有着更佳的用户体验。从公司角度往html5方向走，不管从可维护性上和可行性上来说，这都是最好的选择，本人是很赞同这个方向的。但是目前阶段来说，也存在着问题。从具体的用户反馈，涛哥也说了，用户意见很大。这个可具体往html5方向不断优化（另一个问题：不断这个词在在当前框架下意味着巨大的工作量），以达到用户满意的效果。在这个问题上，假如html5并没有达到预期的效果，而原生方面又没有一点积累，那么从长远来说，移动应用是不能持续走下去的。作为iOS开发人员，公司的大方向并不是我能把握和决定，不管android和微信怎么样，首先要保证iOS有个备选方案，CSUIKit这块我做不做，其实对android和微信端并不会有什么影响，只是iOS这一块的一种优化和原有项目的重构，又不会与html5方式有什么冲突。"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"iOS这边整理这个东西，只为独善其身。"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"章节一：为什么要写这个东西？" content:@""]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"1、响应公司提出的产品化要求"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView informWithcontent:@"移动应用效果并没有达到，急需一种突破"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"2、降低开发成本。"]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"3、移动应用的页面效果，小至字体大小颜色，都是经过不断优化沉淀的。这要求相对低的维护成本让我们的持续升级优化成为可能。这部分代码必须独立于具体项目，其他项目以公共库的形式调用。而且有统一的调用接口，公共类的升级优化并不会影响具体业务的实现逻辑。"]];
    
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"章节二：该框架的特性" content:@""]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"1、页面效果和业务逻辑的分离。将页面元素模块化，视图模块按照上下顺序进行排列，依据所对应的类和数据在所在区域内进行自适应布局。"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    CS_Page_Button *demostrateButton = [CS_Page_Button new];
    demostrateButton.buttonName = @"演示";
    demostrateButton.clickHandler = ^{
        if (!self.isDemostrating) {
            
            for (int i = 0; i < self.displayItemsGlobal.count; i++) {
                CSBaseView *baseView = [self.displayItemsGlobal objectAtIndex:i];
                baseView.layer.borderWidth = 1;
                baseView.layer.borderColor = [UIColor whiteColor].CGColor;
                
                [self sectionClassHandle:baseView isDemosrate:YES];
            }
            
            self.isDemostrating = YES;
        }else{
            for (int i = 0; i < self.displayItemsGlobal.count; i++) {
                CSBaseView *baseView = [self.displayItemsGlobal objectAtIndex:i];
                baseView.layer.borderWidth = 0.0;
                baseView.layer.borderColor = [UIColor whiteColor].CGColor;
                
                [self sectionClassHandle:baseView isDemosrate:NO];
            }
            self.isDemostrating = NO;
        }
    };
    [displayItems addObject:demostrateButton];
    
    [displayItems addObject:[CS_Page_DescriptionView informWithcontent:@"提示：可点击上面的演示按钮以观察该demo的界面布局。"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"所有视图模型，都继承于CSBaseView，子类覆写了父类的公共方法[-(CGFloat)layoutView:(UIView *)superView primaryY:(CGFloat)primaryY;],所以整个页面的布局就是调用CSBaseView的子类对象集合的 layoutView 方法。 既实例化CSBaseView子类对象，调用layoutView方法。"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"2、对于原生页面，降低页面开发所需要的代码量，统一页面分格。"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"3、该框架分离成一个独立项项目，可独立调试放在公司的服务器上。其他项目通过cocoapod用命令行形式从服务器上自动下载并集成到项目中。"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView informWithcontent:@"说明：具体的服务器地址为10.1.10.5/gitstack具体找冲哥要下载权限 或者下载外网地址：(https://git.oschina.net/centralsoft/csuikit2.git)"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"章节三：CSUIKit界面元素" content:@""]];
//    [displayItems addObject:[CS_Page_TextView page_textView:@"界面元素的罗列" dataValue:@"区域标题栏\r\nCS_Page_SectionTitleView;描述文字\r\nCS_Page_DescriptionView;图片\r\nCS_Page_ImageViewer;查询栏\r\nCS_Page_QueryPanelView;单选按钮\r\nCS_Page_RadioView;空白\r\nCS_Page_SpaceView;输入框\r\nCS_Page_TextFieldView;单选框\r\nCS_Pop_SingleSelectView;复选框\r\nCS_Pop_MultitpleSelectView;进度条\r\nCS_Pop_Progress;时间选择器\r\nCS_Pop_DateTimePickView"]];
    
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"用于功能模块分割的CS_Page_SectiionTitleView"]];
    [displayItems addObject:[CS_Page_SectionTitleView page_SectionTitleView:@"模块名称" color:COLOR_THEME image:nil]];
    
    CS_Page_SectionTitleView *sectionTitle = [CS_Page_SectionTitleView page_SectionTitleView:@"弹出型界面元素" color:COLOR_THEME image:nil];
    [displayItems addObject:sectionTitle];
    
    [sectionTitle.sectionItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"1 弹出型进度条"]];
    
    CS_Page_Button *progressButton = [CS_Page_Button new];
    progressButton.buttonName = @"圆形进度条";
    progressButton.clickHandler = ^{
        [[CS_Pop_Progress new] popShow];
    };
    [sectionTitle.sectionItems addObject:progressButton];
    [sectionTitle.sectionItems addObject:[CS_Page_DescriptionView informWithcontent:@"说明：适用于和服务端通讯的时候进行友好提示"]];
    
    [sectionTitle.sectionItems addObject:[CS_Page_SpaceView new]];
    CS_Page_Button *singleSelectButton = [CS_Page_Button new];
    [sectionTitle.sectionItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"2 弹出型单选框"]];
    singleSelectButton.buttonName = @"单选框";
    singleSelectButton.clickHandler = ^{
        [[CS_Pop_SingleSelectView pop_SingleSelectView:@"请选择" selectItems:@[@"选项1", @"选项2", @"选项3", @"选项4"] selectHandler:^(NSInteger section, NSInteger index, NSString *selectString) {
           
        }] popShow:self];
    };
    [sectionTitle.sectionItems addObject:singleSelectButton];
    
    
    
    [sectionTitle.sectionItems addObject:[CS_Page_SpaceView new]];
    [sectionTitle.sectionItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"4 时间选择器"]];
    CS_Page_Button *dateButton = [CS_Page_Button new];
    dateButton.buttonName = @"日期选择器";
    dateButton.clickHandler = ^{
        [[CS_Pop_DateTimePickView instanceDateTimePickViewWithSaveClickHandler:^(NSString *selectDate) {
            
        } cancelClickHandler:^{
            
        }] popShow:self];
    };
    [sectionTitle.sectionItems addObject:dateButton];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];

    CS_Page_SectionTitleView *querySectionView = [CS_Page_SectionTitleView page_SectionTitleView:@"查询栏" color:COLOR_THEME image:nil];
    [displayItems addObject:querySectionView];
    CS_Page_Button *queryButton = [CS_Page_Button new];
    
    queryButton.buttonName = @"查询栏";
    queryButton.clickHandler = ^{
        
        CS_Page_QueryPanelView *queryPanel = [CS_Page_QueryPanelView new];
        
        CSConditionModel *model1 = [CSConditionModel new];
        model1.keyCode = @"qymc";
        model1.name = @"企业名称";
        model1.type = CSViewType_PageTextView;
        model1.placeHolder = @"请输入企业名称";
        
        CSConditionModel *model2 = [CSConditionModel new];
        model2.keyCode = @"qylx";
        model2.name = @"企业类型";
        model2.type = CSViewType_PageSingleView;
        model2.placeHolder = @"请输入企业类型";
        model2.selectItems = @[@"食品企业", @"保化企业", @"药品企业", @"餐饮企业"];
        
        CSConditionModel *model3 = [CSConditionModel new];
        model3.keyCode = @"sj";
        model3.name = @"时间";
        model3.type = CSViewType_PageTimePickView;
        model3.placeHolder = @"时间";
        
        
        queryPanel.conditionArray = @[model1, model2, model3];
        [queryPanel layoutView:self.scrollView primaryY:0];
        
//        [queryPanel.conditionArray addObject:model1];
//        [queryPanel.conditionArray addObject:model2];
//        [queryPanel.conditionArray addObject:model3];
        
        [queryPanel popShow:self];
        
    };
    [querySectionView.sectionItems addObject:queryButton];
    [querySectionView.sectionItems addObject:[CS_Page_DescriptionView informWithcontent:@"说明：点击上面按钮代开查询界面"]];
    [querySectionView.sectionItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    
    self.btCS_Page_SectionTitleView = [CS_Page_SectionTitleView page_SectionTitleView:@"个人信息" color:COLOR_THEME image:nil];
    self.mzCS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"名字" keyboardType:UIKeyboardTypeDefault];
    self.czCS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"传真" keyboardType:UIKeyboardTypeDefault];
    self.dhCS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"电话" keyboardType:UIKeyboardTypeDefault];
    self.dzCS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"地址" keyboardType:UIKeyboardTypeDefault];
    self.zwCS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"部门" keyboardType:UIKeyboardTypeDefault];
    self.sjCS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"手机" keyboardType:UIKeyboardTypeDefault];
    self.yxCS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"邮箱" keyboardType:UIKeyboardTypeDefault];
    self.ybCS_Page_TextFieldView = [CS_Page_TextFieldView textFiledWithPlaceHolder:@"邮编" keyboardType:UIKeyboardTypeDefault];
    
    self.czCS_Page_TextFieldView.textFieldType = CSTextFieldType_Fax;
    self.dhCS_Page_TextFieldView.textFieldType = CSTextFieldType_Phone;
    self.dzCS_Page_TextFieldView.textFieldType = CSTextFieldType_Address;
    self.mzCS_Page_TextFieldView.textFieldType = CSTextFieldType_UserName;
    self.sjCS_Page_TextFieldView.textFieldType = CSTextFieldType_Phone;
    self.yxCS_Page_TextFieldView.textFieldType= CSTextFieldType_Email;
    
    [self.btCS_Page_SectionTitleView.sectionItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"以下为输入栏的演示"]];
    [self.btCS_Page_SectionTitleView.sectionItems addObject:self.mzCS_Page_TextFieldView];
    [self.btCS_Page_SectionTitleView.sectionItems addObject:self.czCS_Page_TextFieldView];
    [self.btCS_Page_SectionTitleView.sectionItems addObject:self.dzCS_Page_TextFieldView];
    [self.btCS_Page_SectionTitleView.sectionItems addObject:self.sjCS_Page_TextFieldView];
    [self.btCS_Page_SectionTitleView.sectionItems addObject:[CS_Page_DescriptionView informWithcontent:@"提示：手机号码的输入做了格式检测的效果"]];
    [self.btCS_Page_SectionTitleView.sectionItems addObject:self.yxCS_Page_TextFieldView];
    CS_Page_Button *pageButton1 = [CS_Page_Button new];
    pageButton1.buttonName = @"提交";
    pageButton1.clickHandler = ^{
        CS_Pop_Progress *pop_Progress = [CS_Pop_Progress new];
        __weak CS_Pop_Progress *weakProgress = pop_Progress;
        [pop_Progress popShow];
        
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            [weakProgress.superKLCPopup dismiss:YES];
        });
    };
    [self.btCS_Page_SectionTitleView.sectionItems addObject:pageButton1];
    [self.btCS_Page_SectionTitleView.sectionItems addObject:[CS_Page_DescriptionView informWithcontent:@"提示：请确保输入信息的正确，并点击提交"]];
    [self.btCS_Page_SectionTitleView.sectionItems addObject:[CS_Page_SpaceView new]];
    [self.btCS_Page_SectionTitleView.sectionItems addObject:[CS_Page_SpaceView new]];
    [self.btCS_Page_SectionTitleView.sectionItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"所有CSBaseView的子类都实现了CSBaseView的reset方法，用于清空输入框的值"]];
    
    
    CS_Page_Button *pageButton2 = [CS_Page_Button new];
    pageButton2.buttonName = @"重置";
    pageButton2.clickHandler = ^{
        [self.mcCS_Page_TextFieldView reset];
        [self.czCS_Page_TextFieldView reset];
        [self.dzCS_Page_TextFieldView reset];
        [self.sjCS_Page_TextFieldView reset];
        [self.yxCS_Page_TextFieldView reset];
    };
    [self.btCS_Page_SectionTitleView.sectionItems addObject:pageButton2];
    [self.btCS_Page_SectionTitleView.sectionItems addObject:[CS_Page_DescriptionView informWithcontent:@"提示：点击重置以清空输入框的值"]];
    [self.btCS_Page_SectionTitleView.sectionItems addObject:[CS_Page_SpaceView new]];
    
    [displayItems addObject:self.btCS_Page_SectionTitleView];
    
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    
    CS_Page_SectionTitleView *sectionTitleView = [CS_Page_SectionTitleView page_SectionTitleView:@"单选栏（非弹出型）" color:COLOR_THEME image:nil];
    CS_Page_RadioView *radioView = [CS_Page_RadioView pageRadioView:@"单选栏" items:@[@"选项1", @"选项2", @"选项3"] selectedHandler:^(NSInteger selectIndex) {
        
    }];
    [sectionTitleView.sectionItems addObject:radioView];
    [sectionTitleView.sectionItems addObject:[CS_Page_SpaceView new]];
    [sectionTitleView.sectionItems addObject:[CS_Page_DescriptionView informWithcontent:@"这个是按照乔姐提供的全程电子化效果来弄的"]];
    [displayItems addObject:sectionTitleView];
    [sectionTitleView.sectionItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    
    CS_Page_SectionTitleView *preloadsectionTitleView = [CS_Page_SectionTitleView page_SectionTitleView:@"列表项的预加载" color:COLOR_THEME image:nil];
    CS_Page_Button *buttonPreloadButton = [CS_Page_Button new];
    buttonPreloadButton.buttonName = @"预加载";
    buttonPreloadButton.clickHandler = ^{
        
    };
//    [preloadsectionTitleView.sectionItems addObject:buttonPreloadButton];
    [preloadsectionTitleView.sectionItems addObject:[CS_Page_DescriptionView informWithcontent:@"预加载效果是根据滑动条的便宜位置，提前从服务端加载下一屏的数据。当滑动到对应位置时，就会看到列表项是连续的。"]];
    [preloadsectionTitleView.sectionItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:preloadsectionTitleView];
    [displayItems addObject:[CS_Page_SpaceView new]];
    
    CS_Page_CheckBox *page_CheckBox = [CS_Page_CheckBox page_CheckBoxWithTitle:@"关闭" isChecked:NO swtichOnHandler:^(CS_Page_CheckBox *page_CheckBox) {
        page_CheckBox.title = @"打开";
        NSLog(@"page_CheckBox:%@", page_CheckBox.value);
    } switchOffHandler:^(CS_Page_CheckBox *page_CheckBox) {
        page_CheckBox.title = @"关闭";
        NSLog(@"page_CheckBox:%@", page_CheckBox.value);
    }];
    
    CS_Page_SectionTitleView *checkBoxSectionTitleView = [CS_Page_SectionTitleView page_SectionTitleView:@"CS_Page_CheckBox(开关视图)" color:COLOR_THEME image:nil];
    [checkBoxSectionTitleView.sectionItems addObject:page_CheckBox];
    [checkBoxSectionTitleView.sectionItems addObject:[CS_Page_DescriptionView informWithcontent:@"提示：点击提示打开或关闭"]];
    [checkBoxSectionTitleView.sectionItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:checkBoxSectionTitleView];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"我有一个小目标：标签化" content:nil]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"所有界面元素都分割成不同的CSBaseView子类自上而下的顺序排列。而构成界面元素基本可以抽象为以下几个：1、名称：（name） 2、提示信息：（placeholder）3、类型(type)-大部分交互效果根据type在各自类中细化 4、值(value) 5、子类（subType）6、字段键值（key），从而形成CSPageElementModel。一张页面的构成从而简化成CSPageElementModel的一个数组。而model实际上也就是数据，存储的地方可以在服务端，也可以在本地。所以就提供了一个可能性，服务端对页面的远程可控。布局信息放在服务端中，APP作为为解析器，下载并解析页面。"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView informWithcontent:@"脑洞大开：就上面的整个思路而言，会发现一个大问题。界面元素标签化服务端远程可控，这不就是网页形式吗。所以能不能将转化为对应的html标签，或者能不能将对应的html标签页面解析成对应的原生页面，这样两种武功终归一派（同时具备高开发效率和高用户体验，这个世界瞬间就和谐了）。"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"一些后续的想法" content:@""]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"其实这块东西我觉得还是很简陋，包括前面很多的效果，都局限于我粗浅的认识，而不能达到理想的状态，后续如果可以，我希望可以形成一种模式。"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"1、测试定期反馈问题，比如觉得这种交互方式很low，自己有新的想法，别人的怎么怎么地样，为什么我们不能之类的，然后我根据收到的意见反馈进行不断修改优化。"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_DescriptionView descriptionViewWithTitle:@"" content:@"2、如果前面效果可以，能不能专门安排一个美工支持这个项目的持续优化。"]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    [displayItems addObject:[CS_Page_SpaceView new]];
    
    CGFloat primaryY = 100.0;
    for (int i = 0; i < displayItems.count ; i++) {
        
        CSBaseView *baseView = [displayItems objectAtIndex:i];
        primaryY = [baseView layoutView:self.scrollView primaryY:primaryY];
        
    }
    
    self.scrollView.contentSize = CGSizeMake(0, primaryY);
    
    [self.view addSubview:self.scrollView];
   
}

-(void)sectionClassHandle:(CSBaseView *)baseView isDemosrate:(BOOL)isDemostrate{
    
    //是不是区域类对象
    if ([baseView isKindOfClass:[CS_Page_SectionTitleView class]]) {
        
        CS_Page_SectionTitleView *sectionTitleView = (CS_Page_SectionTitleView *)baseView;
        
        for (int i = 0; i < sectionTitleView.sectionItems.count; i++) {
            CSBaseView *baseView = [sectionTitleView.sectionItems objectAtIndex:i];
            if (isDemostrate) {
                baseView.layer.borderColor = [UIColor colorFromHexCode:@"e7e7e7"].CGColor;
                baseView.layer.borderWidth = 0.3;
            }else{
                baseView.layer.borderWidth = 0.0;
            }
        }
    }
}

-(void)loadResource{
    
    [CS_Page_SectionTitleView addImageIcon:SectionTitleType_Basic iconImage:[UIImage imageNamed:@"basicInfo"]];
    [CS_Page_SectionTitleView addImageIcon:SectionTitleType_Edit iconImage:[UIImage imageNamed:@"editInfo"]];
    [CSBaseView loadPreloadImage:[UIImage imageNamed:@"preloadImage"]];
    [CS_Page_TextFieldView loadImageWithType:CSTextFieldType_Email value:[UIImage imageNamed:@"email"]];
    [CS_Page_TextFieldView loadImageWithType:CSTextFieldType_Phone value:[UIImage imageNamed:@"phone"]];
    [CS_Page_TextFieldView loadImageWithType:CSTextFieldType_Person value:[UIImage imageNamed:@"person"]];
    [CS_Page_TextFieldView loadImageWithType:CSTextFieldType_Address value:[UIImage imageNamed:@"address"]];
    [CS_Page_TextFieldView loadImageWithType:CSTextFieldType_DateTime value:[UIImage imageNamed:@"dateTime"]];
    [CS_Page_TextFieldView loadImageWithType:CSTextFieldType_UserName value:[UIImage imageNamed:@"username"]];
    [CS_Page_TextFieldView loadImageWithType:CSTextFieldType_Password value:[UIImage imageNamed:@"password"]];
    [CS_Page_TextFieldView loadImageWithType:CSTextFieldType_EnterpriseName value:[UIImage imageNamed:@"enterpriseName"]];
    [CS_Page_TextFieldView loadImageWithType:CSTextFieldType_Fax value:[UIImage imageNamed:@"fax"]];
    [CS_Page_TextFieldView loadImageWithType:CSTextFieldType_JobPosition value:[UIImage imageNamed:@"jobPosition"]];
    [CS_Page_TextFieldView loadImageWithType:CSTextFieldType_PostCode value:[UIImage imageNamed:@"postCode"]];
    [CS_Radio_ItemView loadImageWithType:CSRadioViewType_UnChecked value:[UIImage imageNamed:@"icon_radiobutton1"]];
    [CS_Radio_ItemView loadImageWithType:CSRadioViewType_Checked value:[UIImage imageNamed:@"icon_radiobutton2"]];
    
    [CSPageEngine loadImage:[UIImage imageNamed:@"downArrow"] forKey:KEY_ICON_DOWN_ARROW];
    [CSPageEngine loadImage:[UIImage imageNamed:@"correct2"] forKey:KEY_ICON_CORRECT];
    [CSPageEngine loadImage:[UIImage imageNamed:@"error2"] forKey:KEY_ICON_WRONG];
    [CSPageEngine loadImage:[UIImage imageNamed:@"arrow_more"] forKey:KEY_ICON_ARROW_MORE];
    [CSPageEngine loadImage:[UIImage imageNamed:@"icon_checkbox2"] forKey:KEY_ICON_CHECKED];
    [CSPageEngine loadImage:[UIImage imageNamed:@"icon_checkbox1"] forKey:KEY_ICON_UNCHECKED];
    [CSPageEngine loadImage:[UIImage imageNamed:@"btn_back"] forKey:KEY_ICON_NAVIGATION_BACK];
    [CSPageEngine loadImage:[UIImage imageNamed:@"arrowUp"] forKey:KEY_ICON_ARROW_UP];
    [CSPageEngine loadImage:[UIImage imageNamed:@"arrowDown"] forKey:KEY_ICON_ARROW_DOWN];
    [CSPageEngine loadImage:[UIImage imageNamed:@"check"] forKey:KEY_ICON_CHECK];
    [CSPageEngine loadImage:[UIImage imageNamed:@"history"] forKey:KEY_ICON_HISTORY];
    [CSPageEngine loadImage:[UIImage imageNamed:@"remove"] forKey:KEY_ICON_REMOVE];
    
    [CSPageEngine loadImage:[UIImage imageNamed:@"icon_radiobutton_disable"] forKey:KEY_ICON_CHECK_DISABLE];
    [CSPageEngine loadImage:[UIImage imageNamed:@"icon_checkbox_y"] forKey:KEY_ICON_CHECK_YES];
    [CSPageEngine loadImage:[UIImage imageNamed:@"icon_radiobutton_y"] forKey:KEY_ICON_RADIO_YES];
    [CSPageEngine loadImage:[UIImage imageNamed:@"icon_radiobutton_n"] forKey:KEY_ICON_RADIO_NO];
    
//#define KEY_ICON_CHECK_DISABLE @"KEY_ICON_CHECK_DISABLE"
//#define KEY_ICON_CHECK_YES @"KEY_ICON_CHECK_YES"
//#define KEY_ICON_RADIO_YES @"KEY_ICON_RADIO_YES"
//#define KEY_ICON_RADIO_NO @"KEY_ICON_RADIO_NO"
    
}

-(void)queryClick{
    
    CSConditionModel *model1 = [CSConditionModel new];
    model1.keyCode = @"qymc";
    model1.name = @"企业名称";
    model1.type = CSViewType_PageTextView;
    model1.placeHolder = @"请输入企业名称";
    
    CSConditionModel *model2 = [CSConditionModel new];
    model2.keyCode = @"qylx";
    model2.name = @"企业类型";
    model2.type = CSViewType_PageSingleView;
    model2.placeHolder = @"请输入企业类型";
    model2.selectItems = @[@"食品企业", @"保化企业", @"药品企业", @"餐饮企业"];
    
    CSConditionModel *model3 = [CSConditionModel new];
    model3.keyCode = @"sj";
    model3.name = @"时间";
    model3.type = CSViewType_PageTimePickView;
    model3.placeHolder = @"时间";
    
    [self.queryPanelView popShow:self];
    return;
}

-(CS_Page_QueryPanelView *)queryPanelView{
    if (_queryPanelView == nil) {
        _queryPanelView = [CS_Page_QueryPanelView new];
    }
    return _queryPanelView;
}

-(void)testClick{
    
//    
//    REMOVE_SUBVIEWS(self.view);
//    
//    //页面描述json配置字符串
//    NSDictionary *dict = @{
//                           @"page_id" : @"4828564375834587",
//                           @"page_title" : @"配置测试页面",
//                           @"page_elements" : @[
//                                   @{
//                                       @"type" : @(6),
//                                       },
//                                   @{
//                                       @"type" : @(6),
//                                       },
//                                   @{
//                                       @"type" : @(6),
//                                       },
//                                   @{
//                                       @"type" : @(6),
//                                       },
//                                   @{
//                                       @"type" : @(5),
//                                       @"title" : @"欢迎回来,",
//                                       @"defaultValue" : @"请填写以下信息以完成注册。",
//                                       },
//                                   @{
//                                       @"type" : @(6),
//                                       },
//                                   @{
//                                       @"type" : @(5),
//                                       //                                       @"title" : @"欢迎回来,",
//                                       @"defaultValue" : @"1：填写账户信息。",
//                                       },
//                                   @{
//                                       @"type" : @(4),
//                                       @"title" : @"用户名",
//                                       @"json" : @"username",
//                                       @"placeHolder" : @"邮箱",
//                                       @"subType" : @(4),
//                                       
//                                       //                                       @"defaultValue": @"xf.wang@centralsoft.com.cn"
//                                       },
//                                   @{
//                                       @"type" : @(4),
//                                       @"title" : @"用户名",
//                                       @"json" : @"username",
//                                       @"placeHolder" : @"账号",
//                                       @"subType" : @"1",
//                                       //                                       @"defaultValue": @"xf.wang@centralsoft.com.cn"
//                                       },
//                                   @{
//                                       @"type" : @(4),
//                                       @"title" : @"传真",
//                                       @"json" : @"username",
//                                       @"placeHolder" : @"传真",
//                                       @"subType" : @"20",
//                                       //                                       @"defaultValue": @"xf.wang@centralsoft.com.cn"
//                                       },
//                                   @{
//                                       @"type" : @(4),
//                                       @"title" : @"职位",
//                                       @"json" : @"username",
//                                       @"placeHolder" : @"职位",
//                                       @"subType" : @"22",
//                                       //                                       @"defaultValue": @"xf.wang@centralsoft.com.cn"
//                                       },
//                                   @{
//                                       @"type" : @(4),
//                                       @"title" : @"邮编",
//                                       @"json" : @"username",
//                                       @"placeHolder" : @"邮编",
//                                       @"subType" : @"21",
//                                       //                                       @"defaultValue": @"xf.wang@centralsoft.com.cn"
//                                       },
//
//                                   @{
//                                       @"type" : @(6),
//                                       },
//                                   @{
//                                       @"type" : @(6),
//                                       },
//                                   
//                                   @{
//                                       @"type" : @(5),
////                                       @"title" : @"欢迎回来,",
//                                       @"defaultValue" : @"2：填写下面的详细信息(可选)。",
//                                       },
//                                  @{
//                                       @"type" : @(4),
//                                       @"title" : @"密码",
//                                       @"json" : @"password",
//                                       @"placeHolder" : @"密码",
//                                       @"isPassword" : @"1",
//                                       @"subType" : @(2),
//                                       //                                       @"defaultValue": @"xf.wang@centralsoft.com.cn"
//                                       },
//                                   @{
//                                       @"type" : @(4),
//                                       @"title" : @"密码确认",
//                                       @"json" : @"password",
//                                       @"placeHolder" : @"密码确认",
//                                       @"isPassword" : @"1",
//                                       @"subType" : @(2),
//                                       //                                       @"defaultValue": @"xf.wang@centralsoft.com.cn"
//                                       },
//                                   
//                                   @{
//                                       @"type" : @(4),
//                                       @"title" : @"手机号码",
//                                       @"json" : @"username",
//                                       @"placeHolder" : @"手机号码",
//                                       @"subType" : @(3),
//                                       //                                       @"defaultValue": @"xf.wang@centralsoft.com.cn"
//                                       },
//                                   @{
//                                       @"type" : @(4),
//                                       @"title" : @"地址",
//                                       @"placeHolder" : @"地址",
//                                       @"subType" : @(9),
//                                       //                                       @"defaultValue": @"xf.wang@centralsoft.com.cn"
//                                       },
//                                   @{
//                                       @"type" : @(6),
//                                       },
//                                   @{
//                                       @"type" : @(6),
//                                       },
//                                   @{
//                                       @"type" : @(5),
//                                       //                                       @"title" : @"欢迎回来,",
//                                       @"defaultValue" : @"3：填写下面信息(必选)。",
//                                       },
//                                   @{
//                                       @"type" : @(4),
//                                       @"title" : @"检查人员",
//                                       @"json" : @"username",
//                                       @"placeHolder" : @"检查人员",
//                                       @"subType" : @(6),
//                                       //                                       @"defaultValue": @"xf.wang@centralsoft.com.cn"
//                                       },
//                                   @{
//                                       @"type" : @(4),
//                                       @"title" : @"用户名",
//                                       @"json" : @"username",
//                                       @"placeHolder" : @"时间",
//                                       @"subType" : @(5),
//                                       //                                       @"defaultValue": @"xf.wang@centralsoft.com.cn"
//                                       },
//                                   @{
//                                       @"type" : @(4),
//                                       @"title" : @"密码",
//                                       @"json" : @"password",
//                                       @"placeHolder" : @"密码",
//                                       @"isPassword" : @"1",
//                                       @"subType" : @(2),
//                                       //                                       @"defaultValue": @"xf.wang@centralsoft.com.cn"
//                                       },
//                                   @{
//                                       @"type" : @(6),
//                                       },
////                                   @{
////                                       @"type" : @(22),
////                                       @"title" : @"下一步",
////                                       },
//                                   
//                                   ]
//                           };
//    
//    _pageEngine = [CSPageEngine pageEngine:dict];
//    
//    CSPageElementModel *addButtonModel = [CSPageElementModel new];
//    addButtonModel.title = @"提交";
//    addButtonModel.type = CSViewType_Page_Button;
//    addButtonModel.clickHandler = ^{
//        [self showMulitAlert];
//    };
//    
//    CSSelectableModel *model = [CSSelectableModel new];
//    model.name = @"鼎折覆餗";
//    
//    CSSelectableModel *model1 = [CSSelectableModel new];
//    model1.name = @"鼎折覆餗1";
//    
//    CSSelectableModel *model2 = [CSSelectableModel new];
//    model2.name = @"鼎折覆餗2";
//    
//    CS_Page_TextSelectView *pageSingleSelectView = [CS_Page_TextSelectView pageTextSelectView:@"企业类型" selectItems:@[@"保化企业", @"餐饮企业", @"药品企业", @"食堂", @"商场", @"电影院", @"游戏厅", @"房地产"] textFieldType:CSTextFieldType_EnterpriseType];
//    
//    CSPageElementModel *pageElementModel = [CSPageElementModel new];
//    pageElementModel.viewInstance = pageSingleSelectView;
//    pageElementModel.pageEngine = _pageEngine;
//    pageSingleSelectView.pageElementModel = pageElementModel;
//    
//    CS_Page_RadioView *pageRadioView = [CS_Page_RadioView pageRadioView:@"企业标注情况" items:@[@"全部企业", @"已标注", @"未标注", @"附近企业"] selectedHandler:^(NSInteger selectIndex) {
//    }];
//
//    CSPageElementModel *pageElementModel1 = [CSPageElementModel new];
//    pageElementModel1.viewInstance = pageSingleSelectView;
//    pageElementModel1.pageEngine = _pageEngine;
//    
//    [_pageEngine.pageModel.elements insertObject:pageRadioView atIndex:8];
//    
//    [_pageEngine.pageModel.elements insertObject:pageElementModel atIndex:7];
//    
//    [_pageEngine loadPage:self.view];
//    
//    [self.view addSubview:self.testButton];
    
}

-(void)click{
    [self.pageEngine refreshPage];
}

/**
 * 布局菜单
 */
-(void)layoutMenu{
    UIButton *button = [[UIButton alloc]init];
    [button setTitle:@"开发" forState:UIControlStateNormal];
    
    [button addTarget:self action:@selector(changeModel) forControlEvents:UIControlEventTouchUpInside];
    
    UIButton *button1 = [[UIButton alloc]init];
    [button1 setTitle:@"运行" forState:UIControlStateNormal];
    
    UIButton *button2 = [[UIButton alloc]init];
    [button2 setTitle:@"提交" forState:UIControlStateNormal];
    
    UIButton *button3 = [[UIButton alloc]init];
    [button3 setTitle:@"帮助" forState:UIControlStateNormal];
    
    CSToolBox *toolBox = [[CSToolBox alloc]initWithButtons:@[button, button1]];
    [self.view addSubview:toolBox];
}

-(void)changeModel{
    self.pageEngine.isDevelopmentMode = !self.pageEngine.isDevelopmentMode;
    [self.pageEngine refreshPage];
}

-(void)showMulitAlert{
    
    CSSelectableModel *model1 = [CSSelectableModel new];
    model1.code = @"1231";
    model1.name = @"标题(CS_Page_SectionTitleView)";
    
    CSSelectableModel *model2 = [CSSelectableModel new];
    model2.code = @"1231";
    model2.name = @"属性(CS_Page_TextFieldView)";
    
    CSSelectableModel *model3 = [CSSelectableModel new];
    model3.code = @"1231";
    model3.name = @"图片(CS_Page_ImageView)";
    
    WS(weakSelf);
    CS_Pop_SingleSelectView *pageSingleSelectView = [CS_Pop_SingleSelectView pop_SingleSelectViewForModel:@"视图类型" selectItems:@[model1, model2, model3] selectHandler:^(NSInteger section, NSInteger index, CSSelectableModel *model) {
        
        switch (index) {
            case 0:
            {
                CSPageElementModel *sectionTitle = [CSPageElementModel new];
                sectionTitle.type = CSViewType_PageSectionTitleView;
                sectionTitle.title = [NSString stringWithFormat:@"标题栏(测试)%d", weakSelf.a];
                weakSelf.a++;
                [weakSelf.pageEngine.pageModel.elements insertObject:sectionTitle atIndex:weakSelf.pageEngine.pageModel.elements.count - 1];
                sectionTitle.pageEngine = weakSelf.pageEngine;
                [weakSelf.pageEngine refreshPage];
            }
                break;
            case 1:
            {
                CSPageElementModel *pageText = [CSPageElementModel new];
                pageText.type = CSViewType_PageTextView;
                pageText.title = [NSString stringWithFormat:@"属性(测试)%d", weakSelf.b];
                pageText.defaultValue = @"是大幅度发";
                weakSelf.b++;
                [weakSelf.pageEngine.pageModel.elements insertObject:pageText atIndex:weakSelf.pageEngine.pageModel.elements.count - 1];
                pageText.pageEngine = weakSelf.pageEngine;
                [weakSelf.pageEngine refreshPage];
            }
                break;
                
            default:
                break;
        }
        
    }];
    
    [CS_Pop_ToastView showWithMessage:@"提示：请填写用户名" toastType:CSToastTypeTop superView:self.view];
    
}

-(NSMutableArray *)displayItemsGlobal{
    if (_displayItemsGlobal == nil) {
        _displayItemsGlobal = [NSMutableArray new];
    }
    return _displayItemsGlobal;
}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

@end

